import { stringify } from 'qs';
import request from '@/utils/request';

// 三级地址
export async function GetBaseAddress(params) {
    return request(`/${window.storeId}/Address/GetBaseAddress?${stringify(params)}`);
}

//地址库列表
export async function GetStoreAddressListWithPage(params) {
    return request(`/${window.storeId}/Address/GetStoreAddressListWithPage?${stringify(params)}`);
}

//新增
export async function AddStoreAddress(params) {
    return request(`/${window.storeId}/Address/AddStoreAddress`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  //修改
export async function UpdateStoreAddress(params) {
    return request(`/${window.storeId}/Address/UpdateStoreAddress`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

    //删除
export async function DeleteStoreAddress(params) {
    return request(`/${window.storeId}/Address/DeleteStoreAddress`, {
      method: 'POST',
      body: {
        ...params
      }
    });
  }

  //Id查询
export async function GetStoreAddress(params) {
    return request(`/${window.storeId}/Address/GetStoreAddress?${stringify(params)}`);
}

